home *** CD-ROM | disk | FTP | other *** search
/ MacAddict 104 / MacAddict_104_2005-04.iso / Software / Internet & Communication / WordPress 1.2.2 freeware.dmg / wordpress / wp-admin / sidebar.php < prev    next >
Encoding:
PHP Script  |  2004-04-25  |  2.0 KB  |  82 lines

  1. <?php
  2. $mode = 'sidebar';
  3.  
  4. $standalone = 1;
  5. require_once('admin-header.php');
  6.  
  7. get_currentuserinfo();
  8.  
  9. if ($user_level == 0)
  10.     die ("Cheatin' uh ?");
  11.  
  12. if ('b' == $_GET['a']) {
  13.  
  14. ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  15. <html xmlns="http://www.w3.org/1999/xhtml">
  16. <head>
  17. <title>WordPress > Posted</title>
  18. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  19. <link rel="stylesheet" href="wp-admin.css" type="text/css" />
  20. </head>
  21. <body
  22.     <p>Posted !</p>
  23.     <p><a href="sidebar.php">Click here</a> to post again.</p>
  24. </body>
  25. </html><?php
  26.  
  27. } else {
  28.  
  29. ?><html>
  30. <head>
  31. <title>WordPress › Sidebar</title>
  32. <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $blog_charset ?>" />
  33. <link rel="stylesheet" href="wp-admin.css" type="text/css" />
  34. <link rel="shortcut icon" href="../wp-images/wp-favicon.png" />
  35. <style type="text/css" media="screen">
  36. form {
  37.     padding: 3px;
  38. }
  39. .sidebar-categories {
  40.     display: block;
  41.     height: 6.6em;
  42.     overflow: auto;
  43.     background-color: #f4f4f4;
  44. }
  45. .sidebar-categories label {
  46.     font-size: 10px;
  47.     display: block;
  48.     width: 90%;
  49. }
  50. </style>
  51. </head>
  52. <body id="sidebar">
  53. <h1 id="wphead"><a href="http://wordpress.org" rel="external">WordPress</a></h1>
  54. <form name="post" action="post.php" method="POST">
  55. <div><input type="hidden" name="action" value="post" />
  56. <input type="hidden" name="user_ID" value="<?php echo $user_ID ?>" />
  57. <input type="hidden" name="mode" value="sidebar" />
  58. <p>Title:
  59. <input type="text" name="post_title" size="20" tabindex="1" style="width: 100%;" />
  60. </p>
  61. <p>Categories:
  62. <span class="sidebar-categories">
  63. <?php dropdown_categories(); ?>
  64. </span>
  65. </p>
  66. <p>
  67. Post:
  68. <textarea rows="8" cols="12" style="width: 100%" name="content" tabindex="2"></textarea>
  69. </p>
  70. <p>
  71.     <input name="saveasdraft" type="submit" id="saveasdraft" tabindex="9" value="Save as Draft" /> 
  72.     <input name="publish" type="submit" id="publish" tabindex="6" style="font-weight: bold;" value="Publish" /> 
  73.   
  74. </p>
  75. </div>
  76. </form>
  77.  
  78. </body>
  79. </html>
  80. <?php
  81. }
  82. ?>